package a08_1;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan("a08_1")
public class A08_1 {
    private static final Logger log = LoggerFactory.getLogger(A08_1.class);


    public static void main(String[] args) {
        //指定A08_1.class才能读到解析到@ComponentScan，否则会报错
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(A08_1.class);
        E e = context.getBean(E.class);
        log.info("f1的类型: {}", e.getF1().getClass());
        log.info("f1: {}", e.getF1());
        log.info("f1: {}", e.getF1());
        log.info("f1: {}", e.getF1());

        log.info("f2的类型: {}", e.getF2().getClass());
        log.info("f2: {}", e.getF2());
        log.info("f2: {}", e.getF2());
        log.info("f2: {}", e.getF2());


        log.info("f3: {}", e.getF3());
        log.info("f3: {}", e.getF3());

        log.info("f4: {}", e.getF4());
        log.info("f4: {}", e.getF4());







    }
}
